package com.jic.member.enums;

import java.util.EnumSet;

/**
 * @author yinhaijun
 * @date: 2020/7/9
 */
public enum MemDrainageStatusEnum {
    WAIT_SUBMIT(1, "待提交"),
    WAIT_AUDIT(2, "待审核"),
    AUDIT_SUCCESS(3, " 审核通过"),
    AUDIT_REFUSE(4,"审核不通过"),
    ;

    private Integer code;
    private String message;

    MemDrainageStatusEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public static MemDrainageStatusEnum getEnumByCode(Integer code){
        EnumSet<MemDrainageStatusEnum> elements = EnumSet.allOf(MemDrainageStatusEnum.class);
        for(MemDrainageStatusEnum enumType : elements){
            if(enumType.getCode().equals(code)){
                return enumType;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
